
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * User: AW
 * Date: 16/03/11
 */
public class Main {
    private static final Logger LOG = LoggerFactory.getLogger(Main.class);

    public static void main(String[] args) throws Exception {
        LOG.info("Jetty is starting...");
        new Main().start();
    }

    public void start() throws Exception {
        int port = 9090;
        Server server = new Server(port);

        server.setHandler(new WebAppContext("D:\\$AW\\ms\\teapuesto\\ms-teapuesto-web\\src\\main\\webapp", "/"));
        server.start();
        LOG.info("Jetty is running in port {}", port);
        server.join();
    }
}
